/* 聊天界面主容器 */
.interview-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 148px); /* 减少高度以适应屏幕 */
  background-color: #0f172a;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 149, 255, 0.3);
  position: relative;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* 添加背景网格效果 */
.interview-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(16, 24, 39, 0.8) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 24, 39, 0.8) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: center center;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

/* 聊天容器 */
.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  position: relative;
  z-index: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.5) rgba(15, 23, 42, 0.3);
}

/* 自定义滚动条 */
.chat-container::-webkit-scrollbar {
  width: 6px;
}

.chat-container::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.3);
  border-radius: 3px;
}

.chat-container::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.5);
  border-radius: 3px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.8);
}

/* 消息气泡基础样式 */
.message-bubble {
  display: flex;
  margin-bottom: 20px;
  position: relative;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 用户消息 */
.user-message {
  flex-direction: row-reverse;
}

/* 消息中的图片容器 */
.message-image-container {
  margin-bottom: 10px;
  border-radius: 8px;
  overflow: hidden;
  max-width: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
}

.message-image-container:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 16px rgba(0, 149, 255, 0.3);
}

/* 消息中的图片样式 */
.message-image {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
  margin: 0 auto;
}

/* 图片预览遮罩样式 */
.message-image-preview-mask {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  background-color: rgba(0, 0, 0, 0.45);
  font-size: 16px;
}

.message-image-preview-mask:hover {
  background-color: rgba(0, 0, 0, 0.65);
}

.preview-image-mask {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  background-color: rgba(0, 0, 0, 0.45);
  font-size: 16px;
}

.preview-image-mask:hover {
  background-color: rgba(0, 0, 0, 0.65);
}

/* 头像样式 */
.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 10px rgba(0, 149, 255, 0.3);
  background-color: #1e293b;
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 消息内容样式 */
.message-content {
  padding: 12px 16px;
  max-width: 70%;
  color: white;
  font-size: 15px;
  line-height: 1.5;
  position: relative;
  border-radius: 12px;
}

/* AI消息样式 */
.ai-message .message-content {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  margin-left: 12px;
  border-top-left-radius: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.ai-message .message-content::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 0;
  width: 0;
  height: 0;
  border-top: 8px solid #1e293b;
  border-left: 8px solid transparent;
}

/* 用户消息样式 */
.user-message .message-content {
  background: linear-gradient(135deg, #1a365d, #164e63);
  margin-right: 12px;
  border-top-right-radius: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.user-message .message-content::before {
  content: "";
  position: absolute;
  right: -8px;
  top: 0;
  width: 0;
  height: 0;
  border-top: 8px solid #1a365d;
  border-right: 8px solid transparent;
}

/* 打字光标闪烁效果 */
.cursor-blink {
  display: inline-block;
  width: 2px;
  height: 16px;
  background-color: #3b82f6;
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* 输入区域容器 */
.input-container {
  padding: 15px;
  background: linear-gradient(to bottom, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.95));
  border-top: 1px solid rgba(59, 130, 246, 0.3);
  position: relative;
  z-index: 2;
  backdrop-filter: blur(10px);
}

/* 图片预览区域 */
.image-preview {
  margin-bottom: 10px;
  position: relative;
}

.preview-wrapper {
  position: relative;
  display: inline-block;
  max-width: 200px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.preview-image {
  max-width: 100%;
  max-height: 150px;
  display: block;
}

.remove-image-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.6) !important;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white !important;
  font-size: 12px;
  border: none !important;
  transition: all 0.2s ease;
}

.remove-image-btn:hover {
  background: rgba(220, 38, 38, 0.8) !important;
  transform: scale(1.1);
}

/* 输入框样式 */
.input-container .ant-input {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 8px;
  color: #e2e8f0; /* 更亮的字体颜色 */
  padding: 10px 12px;
  resize: none;
  box-shadow: 0 0 15px rgba(0, 149, 255, 0.15);
  transition: all 0.3s ease;
}

.input-container .ant-input:hover {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #e2e8f0; /* 保持原有颜色 */
}

.input-container .ant-input:focus {
  border-color: rgba(59, 130, 246, 0.8);
  box-shadow: 0 0 15px rgba(0, 149, 255, 0.3);
  color: #e2e8f0; /* 保持字体颜色不变 */
}

.input-container .ant-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* 输入框操作区 */
.input-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

/* 上传按钮样式 */
.upload-button {
  color: rgba(59, 130, 246, 0.8) !important;
  font-size: 20px;
  transition: all 0.3s ease;
  background: transparent !important;
  border: none !important;
}

.upload-button:hover {
  color: rgba(59, 130, 246, 1) !important;
  transform: scale(1.1);
}

.upload-button[disabled] {
  color: rgba(255, 255, 255, 0.3) !important;
}

/* 发送按钮样式 */
.send-button {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
  border: none !important;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
}

.send-button:hover {
  background: linear-gradient(135deg, #2563eb, #1e40af) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(59, 130, 246, 0.4);
}

/* 技术信息指示器 */
.tech-info {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  padding: 6px 12px;
  border-radius: 20px;
  color: #3b82f6;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid rgba(59, 130, 246, 0.4);
  box-shadow: 0 0 15px rgba(0, 149, 255, 0.2);
}

.tech-pulse {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  margin-right: 8px;
  position: relative;
}

.tech-pulse::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  width: 16px;
  height: 16px;
  background-color: rgba(16, 185, 129, 0.3);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }
  70% {
    transform: scale(1.2);
    opacity: 0;
  }
  100% {
    transform: scale(0.8);
    opacity: 0;
  }
}

/* 科技风格装饰元素 */
.tech-lines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  overflow: hidden;
  z-index: 5;
}

.tech-line {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(59, 130, 246, 0.3) 15%, 
    rgba(59, 130, 246, 0.8) 30%, 
    rgba(16, 185, 129, 0.8) 50%, 
    rgba(59, 130, 246, 0.8) 70%, 
    rgba(59, 130, 246, 0.3) 85%, 
    transparent 100%);
  animation: techLineScan 8s infinite linear;
}

.tech-line:nth-child(2) {
  animation-delay: 2.5s;
}

.tech-line:nth-child(3) {
  animation-delay: 5s;
}

@keyframes techLineScan {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* 输入框科技风格 */
.tech-input {
  position: relative;
  overflow: hidden;
}

.tech-input::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #10b981, #3b82f6);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 1;
}

.tech-input:focus-within::before {
  transform: translateX(0);
}

/* 消息气泡发光效果 */
.ai-message .message-content {
  position: relative;
  overflow: hidden;
}

.ai-message .message-content::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(59, 130, 246, 0.1) 0%, 
    transparent 50%, 
    rgba(16, 185, 129, 0.1) 100%);
  pointer-events: none;
}

.user-message .message-content::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(16, 185, 129, 0.1) 0%, 
    transparent 50%, 
    rgba(59, 130, 246, 0.1) 100%);
  pointer-events: none;
}

/* 响应式调整 */
@media (max-height: 700px) {
  .interview-container {
    height: calc(100vh - 120px);
  }
}

/* 页脚样式 */
.interview-footer {
  text-align: center;
  padding: 10px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.5));
  position: relative;
  z-index: 1;
}